<template>
  <el-form label-width="80px" size="mini">
    <el-form-item label="内容">
      <data-source-btn/>
      <el-input type="textarea" rows="5" v-model="item.text"></el-input>
    </el-form-item>
    <el-form-item label="对齐">
      <el-radio-group v-model="item.textAlign" size="mini">
        <el-radio-button label="left">左对齐</el-radio-button>
        <el-radio-button label="center">居中</el-radio-button>
        <el-radio-button label="right">右对齐</el-radio-button>
      </el-radio-group>
    </el-form-item>
    <el-form-item label="字号">
      <el-input-number v-model="item.fontSize" :min="10"></el-input-number>
      px
    </el-form-item>
    <el-form-item label="字体粗细">
      <el-select v-model="item.fontWeight">
        <el-option value="normal" label="标准"></el-option>
        <el-option value="bold" label="粗体"></el-option>
        <el-option value="bolder" label="更粗"></el-option>
        <el-option value="lighter" label="更细"></el-option>
      </el-select>
    </el-form-item>
    <el-form-item label="行高">
      <el-input-number v-model="item.lineHeight" :min="10"></el-input-number>
      px
    </el-form-item>
    <el-form-item label="字体颜色">
      <div style="display: flex;flex-direction: row;align-items: center">
        <el-color-picker v-model="item.color"></el-color-picker>
        &nbsp;
        <span>{{item.color}}</span>
      </div>

    </el-form-item>
    <el-form-item label="背景颜色">
      <el-color-picker v-model="item.backgroundColor"></el-color-picker>
    </el-form-item>
  </el-form>
</template>
<script>
  import DataSourceBtn from '../../dataSource/button';

  export default {
    name: 'vpd-text-style',
    components: {
      DataSourceBtn
    },
    props: {
      item: {
        type: Object
      }
    }
  }
</script>
